package org.quipu.dto;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class AccountDetailDto implements Serializable {

    private AccountDto account;
    private Map<Long, Double> balance = new HashMap<Long, Double>();

    public AccountDto getAccount() {
        return account;
    }

    public void setAccount(AccountDto account) {
        this.account = account;
    }

    public Map<Long, Double> getBalance() {
        return balance;
    }

    public Double getCurrencyBalance(Long currencyId) {
        Double sum = balance.get(currencyId);
        if(sum == null) {
            return 0.0;
        }
        return sum;
    }

    public void addCurrencyBalance(Long currencyId, Double sum) {
        balance.put(currencyId, sum);
    }
}
